package com.zpeb.pdd.filter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName pdd
 * @Description: TODO
 * @date ${DAT}14:41
 */
@Configuration
public class AllowConfiguration implements WebMvcConfigurer {
    @Autowired
    ParamInterceptor paramInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        InterceptorRegistration registration = registry.addInterceptor(paramInterceptor);
        registration.addPathPatterns("/**");
        registration.excludePathPatterns("/login/*");
        registration.excludePathPatterns("/chat/*");
        registration.excludePathPatterns("/login");
    }
}
